<?php

class Core_Component_Cms_Model_Content extends Core_Model_Entity_Dynamic_Version {

    protected $tableName = '{t}cms_content';
    
    protected function beforeInsert(){
        $this->setCreator($GLOBALS[RC]->getIdentity()->getName())
             ->setUpdator($GLOBALS[RC]->getIdentity()->getName())
             ->setWebsiteId(App::getRunningWebsite()->getId());
    }
    
    protected function beforeUpdate(){
        $this->setUpdator($GLOBALS[RC]->getIdentity()->getName());
    }    
}